package com.lock.chess.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lock.chess.Enums.GameStatusEnum;
import lombok.Data;

@Data
public class GameRoom {
    @TableId(type = IdType.AUTO)
    private String roomId;

    private String redUserCode;

    private String blackUserCode;
    @TableField(fill = FieldFill.INSERT)
    private String createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateTime;

    private GameStatusEnum status;

    private String winnerUserCode;

    private int pkTimes = 0;
    @TableField(exist = false)
    private Player redPlayer;
    @TableField(exist = false)
    private Player blackPlayer;

}
